package com.yvon.maple.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 树dto
 *
 * @author Yvon
 * @since 2023-01-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseTreeDTO<T> extends BaseDTO {

    /**
     * 父ID
     */
    @ApiModelProperty(value = "父ID")
    private Long parentId;

    /**
     * 所有父ID
     */
    @ApiModelProperty(value = "所有父ID")
    private String parentIds;

    /**
     * 本级排序号
     */
    @ApiModelProperty(value = "本级排序号")
    private Integer treeSort;

    /**
     * 本级排序号和所有父级排序号
     */
    @ApiModelProperty(value = "本级排序号和所有父级排序号")
    private String treeSorts;

    /**
     * 树层级
     */
    @ApiModelProperty(value = "树层级")
    private Integer treeLevel;

    /**
     * 是否叶子节点(1：是 ；0：不是）
     *
     */
    @ApiModelProperty(value = "是否叶子节点(1：是 ；0：不是）")
    private Integer treeLeaf;

    /**
     * 子节点
     */
    @ApiModelProperty(value = "子节点")
    @TableField(exist = false)
    private List<?> children = new ArrayList<>();
}
